From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj@www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj@www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces@linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj@www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj@www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj@www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj@www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root@serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root@serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root@serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj@www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root@serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root@serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root@serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root@serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root@serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root@serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj@www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root@serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root@serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root@serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root@serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root@serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root@serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa@serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa@serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj@www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Tue Mar 14 23:21:50 2006 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:50 2006 Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:50 2006 Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj@www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0001.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj@www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0001.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj@www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces@linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0001.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0001.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj@www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj@www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0001.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj@www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj@www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root@serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root@serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root@serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj@www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root@serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root@serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root@serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root@serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root@serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root@serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj@www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root@serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root@serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root@serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root@serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root@serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root@serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa@serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa@serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj@www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:10 2006 Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj@www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0002.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj@www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0002.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj@www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces@linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0002.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0002.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj@www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon@alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj@www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon@alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0002.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon@alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj@www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj@www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root@serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root@serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root@serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj@www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root@serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root@serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root@serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root@serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root@serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root@serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj@www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root@serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root@serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root@serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root@serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root@serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root@serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa@serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa@serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj@www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:09 2006 Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj@www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0003.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0003.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0003.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0003.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0003.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0004.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0004.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0004.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0004.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0004.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0005.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0005.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0005.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0005.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0005.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0006.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0006.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0006.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0006.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0006.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0007.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0007.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0007.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0007.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0007.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0008.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0008.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0008.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0008.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0008.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0009.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0009.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0009.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0009.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0009.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0010.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0010.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0010.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0010.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0010.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0011.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0011.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0011.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0011.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0011.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0012.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0012.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0012.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0012.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0012.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0013.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0013.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0013.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0013.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0013.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0014.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0014.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0014.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0014.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0014.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0015.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0015.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0015.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0015.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0015.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0016.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0016.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0016.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0016.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0016.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0017.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0017.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0017.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0017.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0017.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0018.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0018.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0018.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0018.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0018.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0019.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0019.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0019.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0019.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0019.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0020.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0020.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0020.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0020.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0020.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0021.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0021.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0021.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0021.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0021.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0022.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0022.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0022.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0022.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0022.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0023.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0023.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0023.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0023.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0023.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0024.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0024.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0024.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0024.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0024.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0025.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0025.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0025.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0025.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0025.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0026.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0026.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0026.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0026.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0026.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0027.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0027.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0027.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0027.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0027.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0028.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0028.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0028.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0028.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0028.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0029.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0029.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0029.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0029.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0029.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0030.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0030.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0030.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0030.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0030.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0031.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0031.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0031.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0031.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0031.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0032.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0032.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0032.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0032.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0032.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0033.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0033.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0033.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0033.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0033.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0034.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0034.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0034.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0034.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0034.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0035.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0035.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0035.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0035.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0035.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0036.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0036.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0036.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0036.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0036.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0037.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0037.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0037.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0037.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0037.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0038.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0038.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0038.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0038.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0038.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0039.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0039.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0039.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0039.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0039.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0040.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0040.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0040.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0040.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0040.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0041.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0041.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0041.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0041.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0041.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0042.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0042.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0042.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0042.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0042.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0043.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0043.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0043.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0043.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0043.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0044.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0044.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0044.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0044.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0044.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0045.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0045.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0045.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0045.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0045.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0046.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0046.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0046.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0046.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0046.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0047.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0047.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0047.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0047.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0047.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0048.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0048.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0048.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0048.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0048.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0049.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0049.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0049.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0049.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0049.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0050.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0050.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0050.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0050.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0050.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0051.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0051.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0051.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0051.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0051.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0052.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0052.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0052.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0052.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0052.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0053.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0053.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0053.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0053.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0053.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0054.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0054.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0054.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0054.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0054.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0055.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0055.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0055.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0055.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0055.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0056.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0056.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0056.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0056.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0056.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0057.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0057.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0057.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0057.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0057.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0058.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0058.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0058.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0058.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0058.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0059.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0059.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0059.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0059.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0059.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0060.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0060.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0060.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0060.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0060.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0061.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0061.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0061.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0061.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0061.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0062.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0062.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0062.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0062.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0062.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0063.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0063.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0063.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0063.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0063.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0064.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0064.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0064.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0064.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0064.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0065.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0065.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0065.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0065.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0065.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0066.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0066.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0066.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0066.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0066.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0067.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0067.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0067.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0067.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0067.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0068.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0068.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0068.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0068.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0068.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0069.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0069.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0069.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0069.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0069.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0070.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0070.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0070.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0070.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure the port is configured properly for bidirectional communication. ECP or EPP supports bidirectional communication. The one other thing you will need to change in order to try the parport driver, is the ports that rxtx has to enumerate. This is in RXTXCommDriver.java:700 { String[] temp={ "lp" "parport" // linux printer port }; CandidatePortPrefixes=temp; } Its also possible to override the enumerated ports without making the above change as documented in the INSTALL doc. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Wed Mar 17 23:18:25 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Thu, 18 Mar 2004 14:18:25 +0800 Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists Message-ID: Hello, I've checked on the archive regarding RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists. Is there any way to work with out changing the source code?I mean using the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any way or a work around in java? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040318/f9ec4d25/attachment-0070.html From taj at www.linux.org.uk Wed Mar 17 23:51:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 06:51:08 +0000 (GMT) Subject: [Rxtx] RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists In-Reply-To: Message-ID: On Thu, 18 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I've checked on the archive regarding RXTX fhs_lock() Error: creating lock > file: /var/lock/LCK..ttyS0: File exists. > Is there any way to work with out changing the source code?I mean using > the existing release rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz is there any > way or a work around in java? > > Usually, it is enough to add the user to group lock or uucp. If another application is using the port, rxtx will not get past the above until the other application closes the port and removes the lockfile. There is information on setting up lock file permissions in the INSTALL file that comes with the source: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17/INSTALL Section R. The other option is to configure rxtx with configure --disable-lockfiles Then rebuild. It is not recommended to ignore lockfiles, however. -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Thu Mar 18 00:22:48 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 23:22:48 -0800 (PST) Subject: [Rxtx] problem with LPRPort In-Reply-To: Message-ID: <20040318072248.52122.qmail@web61109.mail.yahoo.com> > used. LPRPort is not intended to be used directly > by applications. ok i got the idea of LPRPort working. > /dev/lp* is the older printer driver in linux. It > supported writes and IO > control calls. There is a newer driver that was > introduced sometime > around linux 2.0. The parport driver. > >you will want to check your BIOS to make sure > the port is configured > properly for bidirectional communication. ECP or > EPP supports > bidirectional communication. my BIOS is configured for ECP mode. > RXTXCommDriver.java:700 > > { > String[] > temp={ > "lp" > > "parport" // linux printer port > }; > > CandidatePortPrefixes=temp; > } i did this and recompiled the package. my simple enumeration code now shows aal the ports. the output is /dev/lp0 /dev/parport0 /dev/parport1 /dev/parport2 /dev/parport3 /dev/parport4 /dev/parport5 /dev/parport6 /dev/parport7 upto this is fine, but now when i added the write function as u specified in the sample code, i called write(data) , "data" is of type integer. then i tried to run the code i get the following error: error :java.io.IOException: Invalid argument in writeByte also i tried dmesg |grep parp on my system, it says : parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] parport0: irq 7 detected lp0: using parport0 (polling). it shows parport0 for two times??. also it shows port as PCSPP, where as in my BIOS, it is set as ECP. could u tell me how to check that whether parallel port driver is properly working (parport). Please help and tel me what is actaully happening. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come out of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From taj at www.linux.org.uk Thu Mar 18 02:42:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Mar 2004 09:42:10 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040318072248.52122.qmail@web61109.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > > > used. LPRPort is not intended to be used directly > > by applications. > > ok i got the idea of LPRPort working. > > > /dev/lp* is the older printer driver in linux. It > > supported writes and IO > > control calls. There is a newer driver that was > > introduced sometime > > around linux 2.0. The parport driver. > > > >you will want to check your BIOS to make sure > > the port is configured > > properly for bidirectional communication. ECP or > > EPP supports > > bidirectional communication. > > my BIOS is configured for ECP mode. > > > > RXTXCommDriver.java:700 > > > > { > > String[] > > temp={ > > "lp" > > > > "parport" // linux printer port > > }; > > > > CandidatePortPrefixes=temp; > > } > > > i did this and recompiled the package. my simple > enumeration code now shows aal the ports. the output > is > > /dev/lp0 > /dev/parport0 > /dev/parport1 > /dev/parport2 > /dev/parport3 > /dev/parport4 > /dev/parport5 > /dev/parport6 > /dev/parport7 > > upto this is fine, but now when i added the write > function as u specified in the sample code, i called > write(data) , "data" is of type integer. then i tried > > to run the code i get the following error: > > error :java.io.IOException: Invalid argument in > writeByte > > also i tried dmesg |grep parp on my system, it says : > > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] > parport0: irq 7 detected > lp0: using parport0 (polling). > > > it shows parport0 for two times??. also it shows port > as PCSPP, where as in my BIOS, it is set as ECP. > > could u tell me how to check that whether parallel > port > driver is properly working (parport). > > Please help and tel me what is actaully happening. > I suspect the parport dmesg is fine. This is intering an area you find more qualified help on other lists. The setup and configuration of the kernel will get better answers on the parport mail list. I dont even have a port suitable for testing this right now. I can help you simplify the problem though. The attached file is a simple program that opens the port, does a write, a read and closes the port. The code should be easy to understand. compile with ``gcc test.c'' then run ``./a.out /dev/portname'' Until that simple test works, the problem is beyond the scope of the rxtx project. There is no Java. That is simple C that should work when the port is configured properly. When that file works properly, I suspect you will find rxtx also works properly. -- Trent Jarvi taj at www.linux.org.uk -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include #include extern int errno; int main( int argc, char **argv ) { char *filename, input[5]; int fd; errno = 0; if( argc < 2 ) { printf("Usage: a.out /dev/portname\n"); exit(1); } printf("Trying to open %s\n", argv[1] ); fd = open( argv[1] , O_RDWR | O_NONBLOCK ); if( fd < 0 ) { fprintf( stderr, "Open failed with: " ); goto fail; } if ( write( fd, "hello\n", sizeof( "hello\n" ) ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } if ( read( fd, input, 5 ) < 0 ) { fprintf( stderr, "Write failed with: " ); goto fail; } close( fd ); exit(0); fail: fprintf( stderr, strerror( errno ) ); fprintf( stderr, "\n" ); close( fd ); exit(1); } From wrrhdev at riede.org Sun Mar 21 08:06:20 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 10:06:20 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. Message-ID: <20040321150620.GI2088@serve.riede.org> Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz installed to # ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar # cat $JAVA_HOME/jre/lib/javax.comm.properties Driver=gnu.io.RXTXCommDriver I get the problem below when attempting to run BlackBox from the commapi samples. Does anybody have a suggestion as to what my problem is, or what to try next? Thanks, Willem Riede. [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009CFA Function=_dl_relocate_object+0x6A Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) - locked <0x44c1a918> (a java.util.Vector) - locked <0x44c1b7f0> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44c19e88> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at BlackBox.main(BlackBox.java:222) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/21589 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776907 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 457K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 76% used [0x44720000, 0x44782400, 0x447a0000) from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 198K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 14% used [0x44c00000, 0x44c31830, 0x44c31a00, 0x44d60000) compacting perm gen total 4096K, used 2685K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 65% used [0x48720000, 0x489bf5a0, 0x489bf600, 0x48b20000) Local Time = Sun Mar 21 09:42:43 2004 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid21589.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 08:13:08 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 15:13:08 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > -rw------- 1 wriede wriede 361941 Mar 17 19:27 javacomm20-x86.tar.Z > -rw-rw-r-- 1 wriede wriede 45556 Mar 20 18:20 rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz > > installed to > > # ls -l $JAVA_HOME/jre/lib/i386/*rx* > -rwxr-xr-x 1 root bin 10075 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so > -rwxr-xr-x 1 root bin 40101 Mar 21 09:36 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so > # ls -l $JAVA_HOME/jre/lib/ext/{com,RX}*.jar > -rw-r--r-- 1 root root 29411 Mar 21 09:39 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar > -rw-r--r-- 1 root root 26285 Mar 21 09:38 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar > > # cat $JAVA_HOME/jre/lib/javax.comm.properties > Driver=gnu.io.RXTXCommDriver > > I get the problem below when attempting to run BlackBox from the commapi samples. > Does anybody have a suggestion as to what my problem is, or what to try next? > > Thanks, Willem Riede. > > [root at serve BlackBox]#java -classpath BlackBox.jar BlackBox > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > Warning: Actions not found: string > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009CFA > Function=_dl_relocate_object+0x6A > Library=/lib/ld-linux.so.2 > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) I would suggest trying to download the source and compiling it on your system. We had another report like this on a Mandrake 10(?). Thats not where I'd expect code problems to blow up. recompiling did help on the Mandrake system. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 10:09:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 12:09:13 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 10:13:08 -0500) References: Message-ID: <20040321170913.GK2088@serve.riede.org> On 2004.03.21 10:13, Trent Jarvi wrote: > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > An unexpected exception has been detected in native code outside the VM. > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > Function=_dl_relocate_object+0x6A > > Library=/lib/ld-linux.so.2 > > > > Current Java thread: > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > I would suggest trying to download the source and compiling it on your > system. We had another report like this on a Mandrake 10(?). Thats not > where I'd expect code problems to blow up. recompiling did help on the > Mandrake system. No dice :-( I downloaded and unpacked rxtx-2.0-7pre1.tar.gz, did ./autogen.sh and ./configure and make as myself and finally make install as root. The result is much the same. Any other suggestions? Thanks, Willem Riede. [root at serve rxtx-2.0-7pre1]# make install make all-am make[1]: Entering directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/wriede/develop/JavaHA/rxtx-2.0-7pre1' /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxSerial.so && ln -s librxtxSerial-2.0.7pre1.so librxtxSerial.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxSerial.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel-2.0.7pre1.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so (cd /usr/java/j2sdk1.4.2_02/jre/lib/i386 && rm -f librxtxParallel.so && ln -s librxtxParallel-2.0.7pre1.so librxtxParallel.so) /usr/bin/install -c i686-redhat-linux-gnu/.libs/librxtxParallel.lai /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la PATH="$PATH:/sbin" ldconfig -n /usr/java/j2sdk1.4.2_02/jre/lib/i386 ---------------------------------------------------------------------- Libraries have been installed in: /usr/java/j2sdk1.4.2_02/jre/lib/i386 If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/ [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/i386/*rx* -rwxr-xr-x 1 root root 54673 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 878 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la lrwxrwxrwx 1 root root 28 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so -> librxtxParallel-2.0.7pre1.so -rwxr-xr-x 1 root root 115949 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so -rwxr-xr-x 1 root root 866 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la lrwxrwxrwx 1 root root 26 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre1.so [root at serve rxtx-2.0-7pre1]# ls -l $JAVA_HOME/jre/lib/ext/RX*.jar -rwxr-xr-x 1 root root 26224 Mar 21 12:01 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar [root at serve rxtx-2.0-7pre1]# cd - /home/wriede/develop/JavaHA/commapi/samples/BlackBox [root at serve BlackBox]# java -classpath BlackBox.jar BlackBox Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Warning: Actions not found: string Devel Library ========================================= Native lib Version = RXTX-2.0-7pre1 Java lib Version = RXTX-2.0-7pre1 RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS1: File exists /dev/ttyS0: PORT_OWNED Unexpected Signal : 11 occurred at PC=0x4267EBF2 Function=[Unknown.] Library=(N/A) NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) at ReceiveTimeout.getValue(ReceiveTimeout.java:93) at ReceiveTimeout.showValue(ReceiveTimeout.java:108) at ReceiveTimeout.(ReceiveTimeout.java:77) at ReceiveOptions.(ReceiveOptions.java:52) at Receiver.(Receiver.java:68) at Receiver.(Receiver.java:100) at SerialPortDisplay.createPanel(SerialPortDisplay.java:466) at SerialPortDisplay.openBBPort(SerialPortDisplay.java:214) at SerialPortDisplay.(SerialPortDisplay.java:125) at BlackBox.addPort(BlackBox.java:294) at BlackBox.main(BlackBox.java:240) Dynamic libraries: 08048000-0804e000 r-xp 00000000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 0804e000-0804f000 rw-p 00005000 09:00 783132 /usr/java/j2sdk1.4.2_02/bin/java 40000000-40015000 r-xp 00000000 09:00 1123874 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00015000 09:00 1123874 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 09:00 1077040 /usr/java/j2sdk1.4.2_02/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 09:00 1582145 /tmp/hsperfdata_root/26921 40023000-40026000 r--s 00000000 09:00 815437 /usr/java/j2sdk1.4.2_02/jre/lib/ext/dnsns.jar 40027000-40034000 r-xp 00000000 09:00 1807972 /lib/tls/libpthread-0.60.so 40034000-40035000 rw-p 0000d000 09:00 1807972 /lib/tls/libpthread-0.60.so 40037000-40039000 r-xp 00000000 09:00 1123950 /lib/libdl-2.3.2.so 40039000-4003a000 rw-p 00001000 09:00 1123950 /lib/libdl-2.3.2.so 4003a000-4016d000 r-xp 00000000 09:00 1809361 /lib/tls/libc-2.3.2.so 4016d000-40171000 rw-p 00132000 09:00 1809361 /lib/tls/libc-2.3.2.so 40174000-4056e000 r-xp 00000000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4056e000-4058a000 rw-p 003f9000 09:00 1776879 /usr/java/j2sdk1.4.2_02/jre/lib/i386/client/libjvm.so 4059c000-405ae000 r-xp 00000000 09:00 1123970 /lib/libnsl-2.3.2.so 405ae000-405af000 rw-p 00011000 09:00 1123970 /lib/libnsl-2.3.2.so 405b1000-405d2000 r-xp 00000000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d2000-405d3000 rw-p 00020000 09:00 1808177 /lib/tls/libm-2.3.2.so 405d3000-405da000 r--s 00000000 09:00 814975 /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar 405da000-405e2000 r--s 00000000 09:00 815442 /usr/java/j2sdk1.4.2_02/jre/lib/ext/comm.jar 405e3000-405ed000 r-xp 00000000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ed000-405ee000 rw-p 0000a000 09:00 1123985 /lib/libnss_files-2.3.2.so 405ee000-405fe000 r-xp 00000000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 405fe000-40600000 rw-p 0000f000 09:00 1776904 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libverify.so 40600000-40620000 r-xp 00000000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40620000-40622000 rw-p 0001f000 09:00 1776890 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libjava.so 40622000-40636000 r-xp 00000000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40636000-40639000 rw-p 00013000 09:00 1776905 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libzip.so 40639000-41fd1000 r--s 00000000 09:00 1760388 /usr/java/j2sdk1.4.2_02/jre/lib/rt.jar 4201b000-42031000 r--s 00000000 09:00 1760387 /usr/java/j2sdk1.4.2_02/jre/lib/sunrsasign.jar 42031000-4210c000 r--s 00000000 09:00 1760386 /usr/java/j2sdk1.4.2_02/jre/lib/jsse.jar 4210c000-4211d000 r--s 00000000 09:00 1760378 /usr/java/j2sdk1.4.2_02/jre/lib/jce.jar 4211d000-42676000 r--s 00000000 09:00 1760379 /usr/java/j2sdk1.4.2_02/jre/lib/charsets.jar 4471e000-4471f000 r-xp 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4471f000-44720000 rw-p 00000000 09:00 1026296 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2 4c923000-4cb23000 r--p 00000000 09:00 489118 /usr/lib/locale/locale-archive 4cd27000-4cd34000 r--s 00000000 09:00 815438 /usr/java/j2sdk1.4.2_02/jre/lib/ext/ldapsec.jar 4cd34000-4cdf0000 r--s 00000000 09:00 815441 /usr/java/j2sdk1.4.2_02/jre/lib/ext/localedata.jar 4cdf0000-4ce0c000 r--s 00000000 09:00 815440 /usr/java/j2sdk1.4.2_02/jre/lib/ext/sunjce_provider.jar 4ce0c000-4ce15000 r--s 00000000 09:01 1402220 /home/wriede/develop/JavaHA/commapi/samples/BlackBox/BlackBox.jar 4ce15000-4d0e0000 r-xp 00000000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d0e0000-4d0f6000 rw-p 002ca000 09:00 1776882 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libawt.so 4d11b000-4d16e000 r-xp 00000000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16e000-4d16f000 rw-p 00052000 09:00 1776899 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libmlib_image.so 4d16f000-4d175000 r--s 00000000 09:00 1417246 /usr/lib/gconv/gconv-modules.cache 4d175000-4d17d000 r-xp 00000000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17d000-4d17e000 rw-p 00007000 09:00 1058743 /usr/X11R6/lib/libXcursor.so.1.0 4d17f000-4d186000 r-xp 00000000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d186000-4d187000 rw-p 00006000 09:00 1058759 /usr/X11R6/lib/libXp.so.6.2 4d187000-4d1d4000 r-xp 00000000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d4000-4d1d7000 rw-p 0004d000 09:00 1058770 /usr/X11R6/lib/libXt.so.6.0 4d1d8000-4d1e5000 r-xp 00000000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e5000-4d1e6000 rw-p 0000c000 09:00 1058745 /usr/X11R6/lib/libXext.so.6.4 4d1e6000-4d1ea000 r-xp 00000000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1ea000-4d1eb000 rw-p 00004000 09:00 1058772 /usr/X11R6/lib/libXtst.so.6.1 4d1eb000-4d2c6000 r-xp 00000000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c6000-4d2c9000 rw-p 000db000 09:00 1058735 /usr/X11R6/lib/libX11.so.6.2 4d2c9000-4d2d0000 r-xp 00000000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d0000-4d2d1000 rw-p 00007000 09:00 1058733 /usr/X11R6/lib/libSM.so.6.0 4d2d1000-4d2e5000 r-xp 00000000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e5000-4d2e6000 rw-p 00013000 09:00 1058728 /usr/X11R6/lib/libICE.so.6.3 4d2e8000-4d3a2000 r-xp 00000000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3a2000-4d3bc000 rw-p 000b9000 09:00 1776886 /usr/java/j2sdk1.4.2_02/jre/lib/i386/libfontmanager.so 4d3bd000-4d3c8000 r-xp 00000000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c8000-4d3c9000 rw-p 0000a000 09:00 1123993 /lib/libnss_nisplus-2.3.2.so 4d3c9000-4d3cd000 r-xp 00000000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3cd000-4d3ce000 rw-p 00003000 09:00 1123982 /lib/libnss_dns-2.3.2.so 4d3ce000-4d3dd000 r-xp 00000000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3dd000-4d3de000 rw-p 0000f000 09:00 1124002 /lib/libresolv-2.3.2.so 4d3e0000-4d3ea000 r-xp 00000000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3ea000-4d3eb000 rw-p 00009000 09:00 1776570 /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.0.7pre1.so 4d3f0000-4d3f7000 r-xp 00000000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f7000-4d3f8000 rw-p 00006000 09:00 1058768 /usr/X11R6/lib/libXrender.so.1.2.2 4d3f8000-4d414000 r-xp 00000000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 4d414000-4d416000 rw-p 0001b000 09:00 1026200 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Heap at VM Abort: Heap def new generation total 576K, used 46K [0x44720000, 0x447c0000, 0x44c00000) eden space 512K, 6% used [0x44720000, 0x44728b48, 0x447a0000) from space 64K, 18% used [0x447a0000, 0x447a2f90, 0x447b0000) to space 64K, 0% used [0x447b0000, 0x447b0000, 0x447c0000) tenured generation total 1408K, used 1101K [0x44c00000, 0x44d60000, 0x48720000) the space 1408K, 78% used [0x44c00000, 0x44d13770, 0x44d13800, 0x44d60000) compacting perm gen total 4096K, used 2845K [0x48720000, 0x48b20000, 0x4c720000) the space 4096K, 69% used [0x48720000, 0x489e7510, 0x489e7600, 0x48b20000) Local Time = Sun Mar 21 12:02:46 2004 Elapsed Time = 1 # # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Java VM: Java HotSpot(TM) Client VM (1.4.2_02-b03 mixed mode) # # An error report file has been saved as hs_err_pid26921.log. # Please refer to the file for further information. # Aborted [root at serve BlackBox]# From taj at www.linux.org.uk Sun Mar 21 10:36:10 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:36:10 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321170913.GK2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > On 2004.03.21 10:13, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > > > An unexpected exception has been detected in native code outside the VM. > > > Unexpected Signal : 11 occurred at PC=0x40009CFA > > > Function=_dl_relocate_object+0x6A > > > Library=/lib/ld-linux.so.2 > > > > > > Current Java thread: > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > > > > I would suggest trying to download the source and compiling it on your > > system. We had another report like this on a Mandrake 10(?). Thats not > > where I'd expect code problems to blow up. recompiling did help on the > > Mandrake system. > > No dice :-( > > Current Java thread: > at gnu.io.RXTXPort.NativeisReceiveTimeoutEnabled(Native Method) > at gnu.io.RXTXPort.isReceiveTimeoutEnabled(RXTXPort.java:411) Yikes If you notice, the Library did load this time. The thread trace shows we are now are well into rxtx native calls. Previously, the library blew up loading. I dont think there is going to be a quick fix for this with the JRE being used. You may have to drop back to tested environments until we can figure it out. The 1.3 JRE's have been fairly well tested. We did test the very early 1.4 JRE's (mostly Sun at the time). This may be something noted earlier on freebsd finally biting linux too. We store some pointers to Java variables in the native code. This is wrong but has worked without issues for the most part in the past. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 10:43:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 21 Mar 2004 17:43:27 +0000 (GMT) Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321150620.GI2088@serve.riede.org> Message-ID: On Sun, 21 Mar 2004, Willem Riede wrote: > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > What version of kernel, glibc and gcc do you have on your Fedora Linux system? I'd like to get an environment together that reproduces this problem. -- Trent Jarvi taj at www.linux.org.uk From wrrhdev at riede.org Sun Mar 21 12:59:17 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 14:59:17 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:43:27 -0500) References: Message-ID: <20040321195917.GM2088@serve.riede.org> On 2004.03.21 12:43, Trent Jarvi wrote: > > On Sun, 21 Mar 2004, Willem Riede wrote: > > > Using SUN's Java sdk 1.4.2_02 on a Fedora Linux system and > > > > What version of kernel, glibc and gcc do you have on your Fedora Linux > system? I'd like to get an environment together that reproduces this > problem. [root at serve BlackBox]# uname -a Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort gcc32-3.2.3-6 gcc-3.3.2-1 gcc-c++-3.3.2-1 gcc-g77-3.3.2-1 gcc-gnat-3.3.2-1 gcc-java-3.3.2-1 glibc-2.3.2-101.4 glibc-common-2.3.2-101.4 glibc-devel-2.3.2-101.4 glibc-headers-2.3.2-101.4 glibc-kernheaders-2.4-8.36 [root at serve BlackBox]# From wrrhdev at riede.org Sun Mar 21 13:09:12 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 15:09:12 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: (from taj@www.linux.org.uk on Sun, Mar 21, 2004 at 12:36:10 -0500) References: Message-ID: <20040321200912.GO2088@serve.riede.org> On 2004.03.21 12:36, Trent Jarvi wrote: > Yikes > > If you notice, the Library did load this time. The thread trace shows > we are now are well into rxtx native calls. Previously, the library blew > up loading. > > I dont think there is going to be a quick fix for this with the JRE being > used. You may have to drop back to tested environments until we can > figure it out. > > The 1.3 JRE's have been fairly well tested. We did test the very early > 1.4 JRE's (mostly Sun at the time). I don't think I can roll back to 1.3 (not just because I don't have that version downloaded any more and SUN's web site doesn't show it either) because IIRC the older jre doesn't play well with Red Hat's nptl series of kernels... (nptl = native posix thread library) . Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 14:01:58 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 16:01:58 -0500 Subject: [Rxtx] Unexpected Signal : 11 occurred at PC=0x40009CFA in native code outside the VM. In-Reply-To: <20040321195917.GM2088@serve.riede.org> (from wrrhdev@riede.org on Sun, Mar 21, 2004 at 14:59:17 -0500) References: <20040321195917.GM2088@serve.riede.org> Message-ID: <20040321210158.GS2088@serve.riede.org> On 2004.03.21 14:59, Willem Riede wrote: > On 2004.03.21 12:43, Trent Jarvi wrote: > > What version of kernel, glibc and gcc do you have on your Fedora Linux > > system? I'd like to get an environment together that reproduces this > > problem. > > [root at serve BlackBox]# uname -a > Linux serve.riede.org 2.4.22-1.2174.nptl #1 Wed Feb 18 16:38:32 EST 2004 i686 i686 i386 GNU/Linux > [root at serve BlackBox]# rpm -qa 'glibc*' 'gcc*' | sort > gcc32-3.2.3-6 > gcc-3.3.2-1 > gcc-c++-3.3.2-1 > gcc-g77-3.3.2-1 > gcc-gnat-3.3.2-1 > gcc-java-3.3.2-1 > glibc-2.3.2-101.4 > glibc-common-2.3.2-101.4 > glibc-devel-2.3.2-101.4 > glibc-headers-2.3.2-101.4 > glibc-kernheaders-2.4-8.36 > [root at serve BlackBox]# I forgot to mention - these rpms I have in their i686 architecture: # rpm -q --queryformat '%{name}-%{version}-%{release}-%{arch}\n' kernel-2.4.22-1.2174.nptl glibc nptl-devel kernel-2.4.22-1.2174.nptl-i686 glibc-2.3.2-101.4-i686 nptl-devel-2.3.2-101.4-i686 Thanks, Willem Riede. From wrrhdev at riede.org Sun Mar 21 18:04:13 2004 From: wrrhdev at riede.org (Willem Riede) Date: Sun, 21 Mar 2004 20:04:13 -0500 Subject: [Rxtx] rpm spec file for rxtx-2.1 Message-ID: <20040322010413.GU2088@serve.riede.org> I would like to suggest the attached spec file for rxtx-2.1. On my system (Fedora, SUN sdk 1.4.2_02) it produces the following rpm: [fedora-qa at serve SPECS]$ rpm -qilp /home/fedora-qa/rpmbuild/RPMS/i386/rxtx-2.1-7pre17.i386.rpm Name : rxtx Relocations: (not relocateable) Version : 2.1 Vendor: (none) Release : 7pre17 Build Date: Sun 21 Mar 2004 07:48:08 PM EST Install Date: (not installed) Build Host: serve.riede.org Group : Development/Libraries Source RPM: rxtx-2.1-7pre17.src.rpm Size : 294652 License: LGPL Signature : (none) URL : www.rxtx.org Summary : RXTX Description : rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. /usr/java/j2sdk1.4.2_02/jre/lib/ext/RXTXcomm.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/gnu.io.rxtx.properties /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxRaw.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial-2.1-7pre17.so /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.la /usr/java/j2sdk1.4.2_02/jre/lib/i386/librxtxSerial.so /usr/share/doc/rxtx-2.1 /usr/share/doc/rxtx-2.1/AUTHORS /usr/share/doc/rxtx-2.1/COPYING /usr/share/doc/rxtx-2.1/ChangeLog /usr/share/doc/rxtx-2.1/INSTALL /usr/share/doc/rxtx-2.1/PORTING /usr/share/doc/rxtx-2.1/README /usr/share/doc/rxtx-2.1/RMISecurityManager.html /usr/share/doc/rxtx-2.1/TODO [fedora-qa at serve SPECS]$ Regards, Willem Riede. -------------- next part -------------- Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From taj at www.linux.org.uk Sun Mar 21 20:15:03 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 03:15:03 +0000 (GMT) Subject: [Rxtx] rpm spec file for rxtx-2.1 In-Reply-To: <20040322010413.GU2088@serve.riede.org> Message-ID: This looks good to me. Do anyone RPM users have any suggestions/comments before we add it? I guess I question if we should package anything other than Serial and Parallel files. The others (Raw,I2C,RS485) are intended to make it easy for other library developers to fiddle with the code at the low levels. ------ Summary: RXTX Name: rxtx Version: 2.1 Release: 7pre17 License: LGPL Group: Development/Libraries Source: rxtx-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}.tar.gz URL: www.rxtx.org Buildroot: /var/tmp/rxtx-root %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n rxtx-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr pwd make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386 make RXTX_PATH=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/i386/ JHOME=$RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT$JAVA_HOME/jre/lib/ext/gnu.io.rxtx.properties find $RPM_BUILD_ROOT/usr -xtype f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then echo "No files!" exit -1 fi %files -f INSTALLED_FILES %defattr(-,root,root) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %clean rm -rf $RPM_BUILD_ROOT %changelog * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. -- Trent Jarvi taj at www.linux.org.uk From jimo at earthlink.net Sun Mar 21 22:32:00 2004 From: jimo at earthlink.net (Jim Owen) Date: Sun, 21 Mar 2004 21:32:00 -0800 Subject: [Rxtx] get_java_var error Message-ID: Hi all, We've been attempting to use rxtx on a RedHat 7.3 box to provide serial communications with a signature capture device. We've been consistently receiving an error from rxtx as follows: "get_java_var: invalid file descriptor" The error is displayed twice and is apparently generated from the code appended to the end of this message. In the same application, we've run into another issue whereby the call to CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on the system. In our case, this throws an error as another process has /dev/ttyS0 open even though we are only interested in /dev/ttyS1. Any suggestions as to where we go with this one? TIA, Jim ********************************************************** public boolean openTabletSerial() { tabletStatus = false; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals( params.tabletComPort )) { break; } } } if ( ! portId.getName().equals( params.tabletComPort ) ) { return tabletStatus; } try { serialPort = (SerialPort) portId.open("SigPlustabletInterface", 2000); } catch (PortInUseException e) { } if ( params.tabletComTest == true ) { if ( isDSR() == false ) { serialPort.close(); } } try { inputStream = serialPort.getInputStream(); outputStream = serialPort.getOutputStream(); } catch (IOException e) { } try { serialPort.addEventListener(this); } catch (TooManyListenersException e) { } serialPort.notifyOnDataAvailable(true); try { serialPort.setSerialPortParams( params.getTabletBaudRate(), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_ODD); serialPort.setInputBufferSize( 0x8000 ); } catch (UnsupportedCommOperationException e) { } tabletStatus = true; return tabletStatus; } ****************************************************** From taj at www.linux.org.uk Sun Mar 21 22:35:52 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:35:52 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: On Sun, 21 Mar 2004, Jim Owen wrote: > Hi all, > > We've been attempting to use rxtx on a RedHat 7.3 box to provide serial > communications with a signature capture device. We've been consistently > receiving an error from rxtx as follows: > > "get_java_var: invalid file descriptor" > > The error is displayed twice and is apparently generated from the code > appended to the end of this message. > > In the same application, we've run into another issue whereby the call to > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > the system. In our case, this throws an error as another process has > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. > > Any suggestions as to where we go with this one? > > TIA, > > Jim > > ********************************************************** > public boolean openTabletSerial() > { > tabletStatus = false; > portList = CommPortIdentifier.getPortIdentifiers(); > while (portList.hasMoreElements()) > { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) > { > if (portId.getName().equals( params.tabletComPort )) > { > break; > } > } > } > if ( ! portId.getName().equals( params.tabletComPort ) ) > { > return tabletStatus; > } > try > { > serialPort = (SerialPort) portId.open("SigPlustabletInterface", > 2000); > } > catch (PortInUseException e) > { > } > > if ( params.tabletComTest == true ) > { > if ( isDSR() == false ) > { > serialPort.close(); > } > } > try > { > inputStream = serialPort.getInputStream(); > outputStream = serialPort.getOutputStream(); > } > catch (IOException e) > { > } > try > { > serialPort.addEventListener(this); > } > catch (TooManyListenersException e) > { > } > > serialPort.notifyOnDataAvailable(true); > try > { > serialPort.setSerialPortParams( params.getTabletBaudRate(), > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_ODD); > serialPort.setInputBufferSize( 0x8000 ); > } > catch (UnsupportedCommOperationException e) > { > } > tabletStatus = true; > return tabletStatus; > } Hi Jim SerialPort.close() should only be called when you are done with the port. The file descriptor is lost after that. For instance, in the above code, if you close the port on !DTR and then request in/output streams, there will be problems like the error messages you see suggest. Once you call close, you may as well toss your reference to the port and start fresh. It may be possible to call open again but I dont know that thats ever been tested. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Mar 21 22:54:35 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Mar 2004 05:54:35 +0000 (GMT) Subject: [Rxtx] get_java_var error In-Reply-To: Message-ID: > > In the same application, we've run into another issue whereby the call to > > CommPortIdentifier.getPortIdentifiers() creates a lock file for each port on > > the system. In our case, this throws an error as another process has > > /dev/ttyS0 open even though we are only interested in /dev/ttyS1. I missed the last part of this. You do not need to enumerate the ports if you know what you are interested in. Test.java in the contrib directory should show an example of opening a port. There is also information on the various types of enumeration of ports you can do in the INSTALL file. You can specify which ports are enumerated. -- Trent Jarvi taj at www.linux.org.uk From dan at sync.ro Tue Mar 16 02:33:05 2004 From: dan at sync.ro (Dan Caprioara) Date: Tue, 16 Mar 2004 11:33:05 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X Message-ID: <4056C9D1.4050908@sync.ro> Hello, I am trying to access an USB device using a serial port. I have downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to my project, along with the libSerial.jnilib. I have written a small program that lists the ports: ---- portList = CommPortIdentifier.getPortIdentifiers(); System.out.println("Port identifiers obtained."); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); System.out.println("Port --> " + portId.getName()); } ---- The problem is that no ports are listed. When I try to access for example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. The libSerial.jnilib is loaded correctly. (Tested: If I move it from the project, I get runtime errors) How can be tested the RXTX library on Mac OS X? What names have the serial ports? Is it ok /dev/ttyX ? Thank you, Dan From J_Arpon at alliance.com.ph Tue Mar 16 02:58:33 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Tue, 16 Mar 2004 17:58:33 +0800 Subject: [Rxtx] Printing problem in Red Hat 9 Message-ID: Hello, I tried writting this code and had some problem. Printout overlapps and some items are not printed also. printing[1] printing[2] printing[3] printing[4] printing[5] . . . printing[15] printing[20] . . printing[50] well some are lost... don't know why? I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates that would work on Red Hat 9? Can anyone help me? this is my code. import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); for(int i=1;i<=50;i++) { ps.print("printing [" + i + "]\n"); } // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040316/3f2671bb/attachment-0071.html From taj at www.linux.org.uk Tue Mar 16 04:17:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 16 Mar 2004 11:17:16 +0000 (GMT) Subject: [Rxtx] Printing problem in Red Hat 9 In-Reply-To: Message-ID: On Tue, 16 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > I tried writting this code and had some problem. Printout overlapps and > some items are not printed also. > printing[1] > printing[2] > printing[3] > printing[4] > printing[5] > . > . > . > printing[15] > printing[20] > . > . > printing[50] > > well some are lost... don't know why? > > I am using Red Hat 9. and using RXTX.bins.1 (1.5) is there any updates > that would work on Red Hat 9? > Can anyone help me? > > this is my code. > > import gnu.io.*; > import java.io.*; > import java.util.*; > > > public class PrintTest > { > public static void main( String[] args ) > { > ParallelPort parport; > OutputStream outputStream; > InputStream inputStream; > PrintStream ps; > try{ > gnu.io.RXTXCommDriver > parPortDriver = new RXTXCommDriver(); > parport = > (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parport.getOutputStream(); > ps = new > PrintStream(outputStream); > for(int > i=1;i<=50;i++) { > ps.print("printing [" + i + "]\n"); > } > // this > throws NullPointerException > inputStream = parport.getInputStream(); > } catch (Exception e) { > e.printStackTrace(); } > } > catch(Exception e){ e.printStackTrace(); > } > } > } > > > > Hi Jude Oh my. You ran into the printer code. This is not anything close to production quality code. Its penciled in and would be a good place to put a coder to work. I'm ashamed of that code :) Now.. if you are just trying to get something done, maybe you could sleep between the prints. I suspect that would get past the problem. I discussed this with jasmine. rxtx printing is a two time looser. The only thing it lacks is a security hole. I dont see this changing here. But maybe someone will pick up the code. -- Trent Jarvi taj at www.linux.org.uk From dmarkman at mac.com Tue Mar 16 14:07:08 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:07:08 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: 1. library should have name librxtxSerial.jnilib it's not clear how you was able to load successfully libSerial.jnilib 2. what kind of the USB device do you have? I suppose device driver should be registered as IOSerialBSDClient or something like that in some system dictionary so IOKit API could access that device if driver wasn't registered properly the following code will fail: if ((classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue)) == NULL) { printf( "IOServiceMatching returned NULL\n" ); return kernResult; } CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, serialIterator); if (kernResult != KERN_SUCCESS) { printf( "IOServiceGetMatchingServices returned %d\n", kernResult); } however you can use the name of the device from /dev directory and setup port manually BTW: did you see some messages in the console (open Console application from /Applications/Utilities folder) On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > Hello, > > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > ---- > portList = CommPortIdentifier.getPortIdentifiers(); > System.out.println("Port identifiers obtained."); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > System.out.println("Port --> " + portId.getName()); > } > ---- > > The problem is that no ports are listed. When I try to access for > example: /dev/cu.modem a gnu.io.NoSuchPortException is thrown. > The libSerial.jnilib is loaded correctly. (Tested: If I move it from > the project, I get runtime errors) > > How can be tested the RXTX library on Mac OS X? What names have the > serial ports? Is it ok /dev/ttyX ? > > Thank you, > Dan > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > Dmitry Markman From dmarkman at mac.com Tue Mar 16 14:08:01 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Tue, 16 Mar 2004 16:08:01 -0500 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <4056C9D1.4050908@sync.ro> References: <4056C9D1.4050908@sync.ro> Message-ID: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > I am trying to access an USB device using a serial port. I have > downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to > my project, along with the libSerial.jnilib. I have written a small > program that lists the ports: > > BTW: why you didn't use installer? Dmitry Markman From J_Arpon at alliance.com.ph Tue Mar 16 20:37:54 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 11:37:54 +0800 Subject: [Rxtx] Printer Status Message-ID: Hello, Got another problem also. How could you know the status of the device of that certain port? Like the printer as an example. How could i know if its ready for printing? How could i know that it's online or offline? Thanks, ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/7f9f3985/attachment-0071.html From taj at www.linux.org.uk Tue Mar 16 21:05:04 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk From J_Arpon at alliance.com.ph Tue Mar 16 22:20:41 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 13:20:41 +0800 Subject: [Rxtx] Printer Status Message-ID: Thanks a lot. ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" Trent Jarvi Sent by: rxtx-bounces at linuxgrrls.org 2004/03/17 12:05 PM Please respond to Java RXTX discussion To: Java RXTX discussion cc: Subject: Re: [Rxtx] Printer Status On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Got another problem also. How could you know the status of the device of > that certain port? > Like the printer as an example. > How could i know if its ready for printing? > How could i know that it's online or offline? > > Thanks, > The code appears to be in place to support the following which commapi ParallelPort javadocs specify: isPaperOut() isPrinterBusy() isPrinterError() isPrinterSelected() isPrinterTimedOut() notifyOnError(boolean) I think the above should work. We have code in there for both w32 and Unix systems. The only thing thats really missing is the output buffer support and the code that controls the port mode (setMode()/getMode()) If there is a specific call you would like to see added, it would not be to hard. But the above is what CommAPI documents. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/092150e2/attachment-0071.html From arundeep78 at yahoo.com Tue Mar 16 23:07:55 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 22:07:55 -0800 (PST) Subject: [Rxtx] Error using LPRPort Message-ID: <20040317060755.1181.qmail@web61108.mail.yahoo.com> hello all! i have rxtx2.1.6 installed and i want to use parallel port using LPRPort class. but when i declare an object of this class and compiles then it says that unable to resolve LPRPort class. although other classes i am able to intialize. also the package gnu.io that i am using contains the LPRPort class. what is the problem and please let me know the solution also. its really urgent. thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From J_Arpon at alliance.com.ph Tue Mar 16 23:17:29 2004 From: J_Arpon at alliance.com.ph (J_Arpon@alliance.com.ph) Date: Wed, 17 Mar 2004 14:17:29 +0800 Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) Message-ID: Hello, Thanks for the help.... By the way, I am new to linux and i have this project using your wonderful RXTX.... What is the latest version that is stable? I am using Red Hat Linux 9 (i386) I looked at the site on downloads but I am not sure which is which ... ??? Sorry ... :) ============================================ Jude Tadeo A. Arpon ????????A?????? ============================================ Supervising Engineer ============================================ Alliance Software, Inc. e-mail: j_arpon at alliance.com.ph Tel No. (+6332) 345-6354 Fax No. (+6332) 345-6433 URL: www.alliance.com.ph ============================================ "If you'll do what you've always done, you'll get what you've always gotten" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040317/dc6000c1/attachment-0071.html From dan at sync.ro Tue Mar 16 23:26:14 2004 From: dan at sync.ro (Dan Caprioara) Date: Wed, 17 Mar 2004 08:26:14 +0200 Subject: [Rxtx] Enumerating ports on Mac OS X In-Reply-To: <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> References: <4056C9D1.4050908@sync.ro> <0277BEA8-778E-11D8-8724-000A95DA5E9C@mac.com> Message-ID: <4057EF86.7020704@sync.ro> I used an Bluetooth USB device. Fortunately I was able to enumerate the ports after activating the device.(I was expecting to see by default in the enumeration ports like /dev/cu.modem, but the only listed ports were the ones created by the BT device after activation - that is enaugh for me.) About the packaged installer: it failed to run the install script, so I used the jnilib and the jar directly. I took a look aver the sources that were packaged into rxtx-2.1-7pre17 and they appear to use the "rxtxSerial" lib. However, in the binary distribution it is used the "Serial" lib. Probably the sources are not in sync with the binary distribution. Thank you for your time! Best regards, Dan Dmitry Markman wrote: > > On Mar 16, 2004, at 4:33 AM, Dan Caprioara wrote: > >> I am trying to access an USB device using a serial port. I have >> downloaded the rxtx-2.1-7pre17 package, and added the RXTXcomm.jar to >> my project, along with the libSerial.jnilib. I have written a small >> program that lists the ports: >> >> > > BTW: why you didn't use installer? > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Tue Mar 16 23:27:20 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:27:20 +0000 (GMT) Subject: [Rxtx] Latest for Red Hat Linux 9 (i386) In-Reply-To: Message-ID: On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > Hello, > > Thanks for the help.... > By the way, I am new to linux and i have this project using your wonderful > RXTX.... > What is the latest version that is stable? I am using Red Hat Linux 9 > (i386) > I looked at the site on downloads but I am not sure which is which ... ??? > Sorry ... :) > > For use with Sun's CommAPI for Solaris: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1-i686-pc-linux-gnu.tar.gz If you would like to use the version that does not require Sun's jar, but is in package gnu.io: ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i686-pc-linux-gnu.tar.gz These have the same basic code so there isnt a significant advantage of one over the other. They are both offered so people can pick what they would prefer. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Mar 16 23:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 06:49:47 +0000 (GMT) Subject: [Rxtx] Error using LPRPort In-Reply-To: <20040317060755.1181.qmail@web61108.mail.yahoo.com> Message-ID: On Tue, 16 Mar 2004, arundeep Singh wrote: > hello all! > > i have rxtx2.1.6 installed and i want to use parallel > port using LPRPort class. but when i declare an > object > of this class and compiles then it says that unable to > > resolve LPRPort class. although other classes i am > able > to intialize. also the package gnu.io that i am using > contains the LPRPort class. what is the problem and > please let me know the solution also. its really > urgent. This hacked SimpleRead from Sun's commapi works with rxtx 2.1-6 on Linux. The ParallelPort class is what you want to use: /* * @(#)SimpleRead.java 1.12 98/06/25 SMI * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * Sun grants you ("Licensee") a non-exclusive, royalty free, license * to use, modify and redistribute this software in source and binary * code form, provided that i) this copyright notice and license appear * on all copies of the software; and ii) Licensee does not utilize the * software in a manner which is disparaging to Sun. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * This software is not designed or intended for use in on-line control * of aircraft, air traffic, aircraft navigation or aircraft * communications; or in the design, construction, operation or * maintenance of any nuclear facility. Licensee represents and * warrants that it will not use or redistribute the Software for such * purposes. */ import java.io.*; import java.util.*; import gnu.io.*; public class SimpleRead implements Runnable { static CommPortIdentifier portId; static Enumeration portList; InputStream inputStream; ParallelPort parallelPort; Thread readThread; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { if (portId.getName().equals("/dev/lp0")) { SimpleRead reader = new SimpleRead(); } } } } public SimpleRead() { try { parallelPort = (ParallelPort) portId.open("SimpleReadApp", 2000); } catch (PortInUseException e) { System.out.println("Failed to open.");} try { inputStream = parallelPort.getInputStream(); } catch (IOException e) {} readThread = new Thread(this); readThread.start(); } public void run() { try { Thread.sleep(20000); } catch (InterruptedException e) {} } } -- Trent Jarvi taj at www.linux.org.uk From arundeep78 at yahoo.com Wed Mar 17 00:26:16 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Tue, 16 Mar 2004 23:26:16 -0800 (PST) Subject: [Rxtx] Error using LPRPort In-Reply-To: Message-ID: <20040317072616.76717.qmail@web61101.mail.yahoo.com> --- Trent Jarvi wrote: > On Tue, 16 Mar 2004, arundeep Singh wrote: > > > hello all! > > > > i have rxtx2.1.6 installed and i want to use > parallel > > port using LPRPort class. but when i declare an > > object > > of this class and compiles then it says that > unable to > > > > resolve LPRPort class. although other classes i am > > able > > to intialize. also the package gnu.io that i am > using > > contains the LPRPort class. what is the problem > and > > please let me know the solution also. its really > > urgent. > > This hacked SimpleRead from Sun's commapi works with > rxtx 2.1-6 on Linux. > The ParallelPort class is what you want to use: well thanks for the help. but the problem is that this code will run as such. but won't work if u try to sth useful. try reading from inputstream and gives exception. i guess the reason is that getInputStream() has no implementation for ParallelPort Class in rxtx2.1-6. if there is some in other then i don't know. by the way i got the solution to my problem by myself. the problem is that LPRPort class is not declared public in its declaration.(i don't know whether it was true or not but logically it sounds correct and it also worked for me :-) ). i chnaged the declaration and recompiled it and my code worked. i.e just that my editor is able to resolve the LPRPort class now. i still have to get some useful work from this class. ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From arundeep78 at yahoo.com Wed Mar 17 03:23:59 2004 From: arundeep78 at yahoo.com (arundeep Singh) Date: Wed, 17 Mar 2004 02:23:59 -0800 (PST) Subject: [Rxtx] problem with LPRPort Message-ID: <20040317102359.63743.qmail@web61108.mail.yahoo.com> hello all! i tried to send data to paralel port in Linux using LPRPort of rxtx2.1-6. when i simply use this library then while compiling it remain unable to resolve LPRPort class. i find that LPRPort class is not declared is not declared public, so i changed it to public recompile the java file and then tried. then i while compiling it remain able to resolve LPRPort. but when i run the program i got the following exception Exception in thread "main" java.lang.IllegalAccessError: tried to access class gnu.io.LPRPort from class RXTXTest at RXTXTest.main(RXTXTest.java:37) now what should i do to get access to parallel Port. can anyone send me a sample code to read and write to parallel port using LPRPort. i have rxtx2.1-6 thanks in advance ===== Arundeep Singh, M.Tech (IS), IIIT Allahabad, U.P, India. ph: 09415262466, 09417066713 http://www.i-cognition.com Don't take life seriously, as you can't come of it alive. __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com From jls at sco.com Wed Mar 17 06:12:00 2004 From: jls at sco.com (Jonathan Schilling) Date: Wed, 17 Mar 2004 08:12 EST Subject: [Rxtx] Printer Status Message-ID: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > From: Trent Jarvi > To: Java RXTX discussion > Subject: Re: [Rxtx] Printer Status > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > Got another problem also. How could you know the status of the device of > > that certain port? > > Like the printer as an example. > > How could i know if its ready for printing? > > How could i know that it's online or offline? > > The code appears to be in place to support the following which commapi > ParallelPort javadocs specify: > > isPaperOut() > isPrinterBusy() > isPrinterError() > isPrinterSelected() > isPrinterTimedOut() > notifyOnError(boolean) > > I think the above should work. We have code in there for both w32 and > Unix systems. [...] Well, you have it in for Linux, using the LPGETSTATUS ioctl call. But as far as I can tell no other Unix implementations have that ioctl. Indeed I think some Unix implementations don't have any way of getting at the parallel port status register in user space -- it's only visible inside the printer drivers at the kernel level. Jonathan Schilling From taj at www.linux.org.uk Wed Mar 17 07:42:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 14:42:45 +0000 (GMT) Subject: [Rxtx] Printer Status In-Reply-To: <200403171317.i2HDH1S06863@nimbus.nj.caldera.com> Message-ID: On Wed, 17 Mar 2004, Jonathan Schilling wrote: > > Date: Wed, 17 Mar 2004 04:05:04 +0000 (GMT) > > From: Trent Jarvi > > To: Java RXTX discussion > > Subject: Re: [Rxtx] Printer Status > > > > On Wed, 17 Mar 2004 J_Arpon at alliance.com.ph wrote: > > > > > Got another problem also. How could you know the status of the device of > > > that certain port? > > > Like the printer as an example. > > > How could i know if its ready for printing? > > > How could i know that it's online or offline? > > > > The code appears to be in place to support the following which commapi > > ParallelPort javadocs specify: > > > > isPaperOut() > > isPrinterBusy() > > isPrinterError() > > isPrinterSelected() > > isPrinterTimedOut() > > notifyOnError(boolean) > > > > I think the above should work. We have code in there for both w32 and > > Unix systems. [...] > > Well, you have it in for Linux, using the LPGETSTATUS ioctl call. > > But as far as I can tell no other Unix implementations have that ioctl. > > Indeed I think some Unix implementations don't have any way of getting > at the parallel port status register in user space -- it's only visible > inside the printer drivers at the kernel level. > It looks like Solaris will support these via a STC_GPPC ioctl(). sys/stcio.h. Not much help. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Mar 17 05:12:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Mar 2004 12:12:06 +0000 (GMT) Subject: [Rxtx] problem with LPRPort In-Reply-To: <20040317102359.63743.qmail@web61108.mail.yahoo.com> Message-ID: On Wed, 17 Mar 2004, arundeep Singh wrote: > hello all! > i tried to send data to paralel port in Linux using > LPRPort of rxtx2.1-6. when i simply use this library > then > while compiling it remain unable to resolve LPRPort > class. i find that LPRPort class is not declared is > not > declared public, so i changed it to public recompile > the > java file and then tried. then i while compiling it > remain able to resolve LPRPort. but when i run the > program i got the following exception > > Exception in thread "main" > java.lang.IllegalAccessError: tried to access class > gnu.io.LPRPort from class RXTXTest > at RXTXTest.main(RXTXTest.java:37) > > now what should i do to get access to parallel Port. > > can anyone send me a sample code to read and write to > parallel port using LPRPort. > i have rxtx2.1-6 > > thanks in advance > Hi arundeep The code I showed earlier is how rxtx Parallel supprt is intended to be used. LPRPort is not intended to be used directly by applications. Thats the lower level implementation that should only be accessed directly from the library package. I threw a read() in the code I sent earlier for testing and saw the following: # java SimpleRead Exception in read java.io.IOException: Input/output error in readByte readByte() is in the native code. So all the classes and native libraries loaded properly. The read just failed. Now hang in here for a second :) /dev/lp* is the older printer driver in linux. It supported writes and IO control calls. There is a newer driver that was introduced sometime around linux 2.0. The parport driver. Parport is fairly well documented. http://kernelbook.sourceforge.net/parportbook.pdf. It is also further documented in the Documentation directory in the kernel source. Besides making sure your kernel drivers are configured properly (IEEE 1284 port) you will want to check your BIOS to make sure th